﻿/// <reference name="MicrosoftAjax.js"/>

Type.registerNamespace("newWindow");

newWindow.ClientBehavior1 = function(element) {
    newWindow.ClientBehavior1.initializeBase(this, [element]);
    this._showHandler=null;
    this._url=null;
    this._target=null;
    this._channelmode=null;
    this._directories=null;
   this._fullscreen=null;
   this._location=null;
   this._menubar=null;
   this._resizable=null;
   this._scrollbars=null;
   this._status=null;
   this._titlebar=null;
   this._toolbar=null;
   this._top=null;
   this._left=null;
   this._height=null;
   this._width=null;
}

newWindow.ClientBehavior1.prototype = {
    initialize: function() {
        newWindow.ClientBehavior1.callBaseMethod(this, 'initialize');
        
        // Add custom initialization here
      
        $addHandler(this.get_element(),'click',Function.createDelegate(this,this._click));
        this._showHandler=Function.createDelegate (this,this._onShow);
     
        $addHandler(this.get_element(),'click',this._showHandler);
        
     //  alert(this._url);
     
    },
    dispose: function() {        
        //Add custom dispose actions here
        newWindow.ClientBehavior1.callBaseMethod(this, 'dispose');
    },
    get_URL : function() {
    return this._url;
    },
    
    set_URL : function(value) {
    this._url=value;
    },
       get_Target : function() {
    return this._target;
    },
    
    set_Target : function(value) {
    this._target=value;
    },
     get_Channelmode : function() {
    return this._channelmode;
    },    
    set_Channelmode : function(value) {
    this._channelmode=value;
    },   
       get_Directories : function() {
    return this._directories;
    },    
    set_Directories : function(value) {
    this._directories=value;
    },    
    
       get_Fullscreen : function() {
    return this._fullscreen;
    },    
    set_Fullscreen : function(value) {
    this._fullscreen=value;
    },
    
     get_Location : function() {
    return this._location;
    },    
    set_Location : function(value) {
    this._location=value;
    },
     get_Menubar : function() {
    return this._menubar;
    },    
    set_Menubar : function(value) {
    this._menubar=value;
    },
     get_Resizable : function() {
    return this._resizable;
    },    
    set_Resizable : function(value) {
    this._resizable=value;
    },
     get_Scrollbars : function() {
    return this._scrollbars;
    },    
    set_Scrollbars : function(value) {
    this._scrollbars=value;
    },
     get_Status : function() {
    return this._status;
    },    
    set_Status : function(value) {
    this._status=value;
    },
     get_Titlebar : function() {
    return this._titlebar;
    },    
    set_Titlebar : function(value) {
    this._titlebar=value;
    },
     get_Toolbar : function() {
    return this._toolbar;
    },    
    set_Toolbar : function(value) {
    this._toolbar=value;
    },
     get_Top : function() {
    return this._top;
    },    
    set_Top : function(value) {
    this._top=value;
    },
     get_Left : function() {
    return this._left;
    },    
    set_Left : function(value) {
    this._left=value;
    },
     get_Height : function() {
    return this._height;
    },    
    set_Height : function(value) {
    this._height=value;
    },
     get_Width : function() {
    return this._width;
    },    
    set_Width : function(value) {
    this._width=value;
    },
    
    _click : function () {
   
 //  window.open(this._url,this._target,String.format("channelmode ={0},directories ={1},fullscreen ={2},height={3},left={4},location={5},menubar ={6},resizable ={7},scrollbars ={8},status ={9},titlebar ={10},toolbar={11},top={12},width={13}",this._channelmode,this._directories,this._fullscreen,this._height,this._left,this._location,this._menubar,this._resizable,this._scrollbars ,this._status ,this._titlebar,this._toolbar,this._top,this._width))
   
    },
    _onShow : function (e)
    {

       if(!this.get_element().disable) {
         this.show();
         e.preventDefault();
         return false;
       }
    },
    show : function() 
    {
 window.open(this._url,this._target,String.format("channelmode ={0},directories ={1},fullscreen ={2},height={3},left={4},location={5},menubar ={6},resizable ={7},scrollbars ={8},status ={9},titlebar ={10},toolbar={11},top={12},width={13}",this._channelmode,this._directories,this._fullscreen,this._height,this._left,this._location,this._menubar,this._resizable,this._scrollbars ,this._status ,this._titlebar,this._toolbar,this._top,this._width))
     }
}
newWindow.ClientBehavior1.registerClass('newWindow.ClientBehavior1', Sys.UI.Behavior);

if (typeof(Sys) !== 'undefined') Sys.Application.notifyScriptLoaded();